package service

import (
	
	"go-empty-project/app/model"
	"go-empty-project/app/tools"
	"github.com/gin-gonic/gin"
)

type AdService struct {
}

func GetAdService(c *gin.Context) *AdService {
	
	terminalService := AdService{}
	return &terminalService
}

func (Ad AdService) Index(c *gin.Context) []model.Ad {
	db := tools.GetDB()

	var ads []model.Ad
	db.Find(&ads)
	
	return ads
}
 
